package org.sanmao.wyj.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.sanmao.wyj.domain.Order;
import org.springframework.web.bind.annotation.PathVariable;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface OrderService extends IService<Order> {
    List<Order> findAllOrders();

    List<Order> findOrderByUid(int id);

    IPage<Order> findOrderByUidAndType(int id, int type, int currentPage, int pageSize);

    Order findOrderByOid(int id);

    Boolean deleteOrderByOid(int id);

    IPage<Order> fuzzyFindOrders(String con, int currentPage, int pageSize);

    IPage<Order> findOrdersPage(int currentPage, int pageSize);

    int addOrder(Order order, HttpServletRequest request);

    IPage<Order> fuzzyFindOrderByConAndUidAndType(String con, int type,int currentPage, int pageSize, HttpServletRequest request);

    IPage<Order> findOrderByState(int currentPage, int pageSize, int state,HttpServletRequest request);

    IPage<Order> findOrderByType(int type, int currentPage, int pageSize);

    IPage<Order> fuzzyFindOrderByConAndType(String con, int type, int currentPage, int pageSize);

    int takeOrder(HttpServletRequest request, int oid);

    Order  findFullOrderByOid(int oid);

    IPage<Order> workerFindOrderByState(int state, int currentPage, int pageSize,HttpServletRequest request);

    int overOrder(int oid,HttpServletRequest request);

    String findUserPhonenumByOid(int oid);

    String findWorkerPhonenumByWid(int oid);

    IPage<Order> fuzzyFindOrderByConAndUidAndState(String con, int state, int currentPage, int pageSize, HttpServletRequest request);
}
